#include <stdio.h>
#include <string.h>

int myStringCmp(const char *ch1, const char *ch2)
{
    // int idx = 0;
    // while(ch1[idx] == ch2[idx] && ch1[idx] != '\0' && ch2[idx] != '\0') {
    //   idx++;
    // }
    // return ch1[idx] - ch2[idx];

    while (*ch1 == *ch2 && *ch1 != '\0' && *ch2 != '\0')
    {
        *ch1++;
        *ch2++;
    }
    printf("#%c#%c#\n", *ch1, *ch2);

    return *ch1 - *ch2;
}

int main()
{
    char *c1 = "abc ";
    char *c2 = "abc";
    printf("%d\n", strcmp(c1, c2));
    printf("%d\n", myStringCmp(c1, c2));

    return 0;
}
